import {setCurrentAccountState} from "../states/account.js";
import myAxios from "../plugins/myAxios.js";


export const getCurrentAccount=async ()=>{
    const res = await myAxios({
        method: "get",
        url: "/account/current",
        }
    );
    if (res.code === 0) {
        setCurrentAccountState(res.data);
        console.log(res, "getCurrentUser axios");
        return res.data;
    }
    // console.log(res.data, "getCurrentUser axios");
    return null;
}